package com.foreknow.dao;

import com.foreknow.model.Admin;

import java.sql.SQLException;
import java.util.List;

public interface AdminDao {
    /**
     * 添加信息
     * @param ad
     * @return
     * @throws SQLException
     */
    public boolean save(Admin ad)throws SQLException;

    /**
     * 查询所有信息
     * @return
     * @throws SQLException
     */
    public List<Object> getQueryAll() throws SQLException;

    /**
     * 根据Id查询留言信息
     * @param adminId
     * @return
     * @throws SQLException
     */
    public Admin getQueryById(int adminId) throws SQLException;

    /**
     * 根据id删除信息
     * @param adminId
     * @return
     * @throws SQLException
     */
    public boolean deleteById(int adminId) throws SQLException;
}
